<?php
header('Content-type: text/javascript; charset=utf-8');
?>
var tinyMCETemplateList = new Array(
<?php

$templates = glob($app_root . $site['home_dir'] . '/tinymce_templates/*');

for ($i=0; $i<count($templates); $i++) {
	$url = substr($templates[$i], strlen($app_root));
	echo '["' . basename($templates[$i]) . '", "' . $url . '", ""]';
	if ($i < count($templates)-1) {
		echo ",";
	}
}


?>
);
